/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License. You may obtain a copy of the License at.
 *  http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 *  either express or implied. See the License for the specific language governing permissions and limitations under the License.
 */

package com.mansoor.app.islamicnames.views;

import android.content.Context;
import android.graphics.Color;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mansoor.app.islamicnames.beans.Name;

/**
 * Created by IntelliJ IDEA.
 * User: TKMAQ61
 * Date: Oct 21, 2009
 * Time: 3:25:06 PM
 */
public class FavorateView extends LinearLayout
{
    private TextView name;
    private TextView gender;
    private TextView meaning;


    public FavorateView(Context context, Name name)
    {
        super(context);
        setOrientation(LinearLayout.VERTICAL);

        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT);
        //   params.setMargins(5, 3, 5, 0);

        this.name = new TextView(context);
        this.name.setText(name.getName());
        this.name.setTextSize(18f);
        this.name.setTextColor(Color.WHITE);
        this.addView(this.name, params);

        this.gender = new TextView(context);
        this.gender.setText(name.getGender());
        this.gender.setTextSize(12f);
        this.gender.setTextColor(Color.GRAY);
        this.addView(this.gender, params);

        this.meaning = new TextView(context);
        this.meaning.setText(name.getMeaning());
        this.meaning.setTextSize(12f);
        this.meaning.setTextColor(Color.GRAY);
        this.addView(this.meaning, params);
    }
}
